<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath =
            request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
                    + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="shortcut icon" href="css/images/favicon.ico" type="image/x-icon"/>
    <title>房屋租赁系统</title>
    <base href="<%=basePath%>">
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
    <style>
        a:hover {
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">

        // 提交分页的查询的表单
        function to_page(url1) {
            $.ajax({
                url: url1,
                type: "post",
                async: false,
                success: function (data) {
                    $("#inside").html(data);

                },
                error: function () {
                    alert("失败，请稍后再试！");
                }
            });
        }

    </script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo"><a href="/toindex.action">首页</a></div>

        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li>欢迎您，${user.username}！</li>
                <li>
                    <a href="javascript:if(confirm('确实要退出登录吗?'))location='login.action?out=true'">退出</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>房屋租赁</h1>
        </div>
        <c:if test="${sessionScope.user.usertype.equals('admin')}">
            <div class="sidebar-content">
                <ul class="sidebar-list">
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>房源信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="houselist.action?status=未租赁"><i class="icon-font">&#xe008;</i>未租赁房源</a>
                                </li>
                                <li><a href="houselist.action?status=申请中"><i class="icon-font">&#xe008;</i>申请中房源</a>
                                </li>
                                <li><a href="houselist.action?status=已租赁"><i class="icon-font">&#xe008;</i>已租赁房源</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>租赁及合同信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="zulist/findzulist.action"><i
                                        class="icon-font">&#xe008;</i>在租列表</a></li>
                                <li><a href="checkout/getallcheckout.action"><i class="icon-font">&#xe008;</i>已退租列表</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>申请列表</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/apply/findapplylist.action"><i class="icon-font">&#xe008;</i>看房申请</a>
                                </li>
                                <li><a href="/applyout/findallapplyout.action"><i class="icon-font">&#xe008;</i>退租申请</a>
                                </li>
                            </ul>
                        </div>
                    </li>

                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>财务信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="paid/showaddpaid.action"><i
                                        class="icon-font">&#xe008;</i>我要收租</a>
                                </li>
                                <li><a href="paid/topaidlist.action"><i
                                        class="icon-font">&#xe008;</i>租客待缴租金</a>
                                </li>
                                <li><a href="paid/selectall.action"><i
                                        class="icon-font">&#xe008;</i>租客已缴租金</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>用户管理</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/findalluserlist.action?type=fangdong"><i
                                        class="icon-font">&#xe008;</i>业主资料管理</a>
                                </li>
                                <li><a href="/findalluserlist.action?type=zuke"><i
                                        class="icon-font">&#xe008;</i>租客资料管理</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>帮助信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/help/infolist.action"><i
                                        class="icon-font">&#xe008;</i>信息列表</a>
                                </li>
                                <li><a href="/help/form.action"><i class="icon-font">&#xe008;</i>添加信息</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe018;</i>个人中心</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/userlist/get.action"><i class="icon-font">&#xe017;</i>个人资料</a>
                                </li>
                                <li><a href="/user/get.action"><i class="icon-font">&#xe017;</i>修改密码</a>
                                </li>
                            </ul>
                        </div>
                    </li>

                </ul>
            </div>
        </c:if>

        <c:if test="${sessionScope.user.usertype.equals('zuke')}">
            <div class="sidebar-content">
                <ul class="sidebar-list">
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>房源信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="houselist.action"><i class="icon-font">&#xe008;</i>系统房源</a>
                                </li>

                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>租赁信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="zulist/myzulist.action"><i
                                        class="icon-font">&#xe008;</i>我的租赁</a>
                                </li>
                                <li><a href="checkout/getmycheckout.action"><i class="icon-font">&#xe008;</i>已退租列表</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>我的申请</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="apply/getmyapply.action"><i
                                        class="icon-font">&#xe008;</i>看房申请列表</a>
                                </li>
                                <li><a href="applyout/getmyapplyout.action"><i class="icon-font">&#xe008;</i>退租申请列表</a>
                                </li>

                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>租金信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="paid/mytopaidlist.action"><i
                                        class="icon-font">&#xe008;</i>待缴租金</a>
                                </li>
                                <li><a href="paid/findmypaid.action"><i
                                        class="icon-font">&#xe008;</i>已缴租金</a>
                                </li>

                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>帮助信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/help/infolist.action"><i
                                        class="icon-font">&#xe008;</i>信息列表</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe018;</i>个人中心</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/userlist/get.action"><i class="icon-font">&#xe017;</i>个人资料</a>
                                </li>
                                <li><a href="/user/get.action"><i class="icon-font">&#xe017;</i>修改密码</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </div>
        </c:if>
        <c:if test="${sessionScope.user.usertype.equals('fangdong')}">
            <div class="sidebar-content">
                <ul class="sidebar-list">
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>房源信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="myhouselist.action?status=未租赁"><i class="icon-font">&#xe008;</i>未出租房源</a>
                                </li>
                                <li><a href="myhouselist.action?status=申请中"><i class="icon-font">&#xe008;</i>申请中房源</a>
                                </li>
                                <li><a href="myhouselist.action?status=已租赁"><i class="icon-font">&#xe008;</i>已租赁房源</a>
                                </li>
                                <li><a href="toaddhouse.action"><i class="icon-font">&#xe008;</i>添加房源</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>租赁及合同信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="zulist/findzulist.action"><i
                                        class="icon-font">&#xe008;</i>在租列表</a>
                                </li>
                                <li><a href="checkout/getallcheckout.action"><i class="icon-font">&#xe008;</i>已退租列表</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>申请列表</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/apply/findapplylist.action"><i class="icon-font">&#xe008;</i>看房申请</a>
                                </li>
                                <li><a href="applyout/findallapplyout.action"><i class="icon-font">&#xe008;</i>退租申请</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>财务信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="paid/showaddpaid.action"><i
                                        class="icon-font">&#xe008;</i>我要收租</a>
                                </li>
                                <li><a href="paid/topaidlist.action"><i
                                        class="icon-font">&#xe008;</i>租客待缴租金</a>
                                </li>
                                <li><a href="paid/selectall.action"><i
                                        class="icon-font">&#xe008;</i>租客已缴租金</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe003;</i>帮助信息</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/help/infolist.action"><i
                                        class="icon-font">&#xe008;</i>信息列表</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                    <li>
                        <a class="a"><i class="icon-font">&#xe018;</i>个人中心</a>
                        <div class="p">
                            <ul class="sub-menu">
                                <li><a href="/userlist/get.action"><i class="icon-font">&#xe017;</i>个人资料</a>
                                </li>
                                <li><a href="/user/get.action"><i class="icon-font">&#xe017;</i>修改密码</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </div>
        </c:if>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font">&#xe06b;</i><span>欢迎使用本系统！</span></div>
        </div>

        <div class="result-wrap" id="inside">
            <jsp:include page="${mainPage==null?'../common/index.jsp':mainPage}"></jsp:include>
        </div>
    </div>

</div>
<!--/main-->
</div>
</body>
</html>